package com.xtpt.disaster.common.consts;

/***
 * 操作系统类型  0-LINUX, 1-WINDOWS
 *
 */
public enum OSTypeEenum implements BaseEnum{

    LINUX(0, "LINUX"),
    WINDOWS(1, "WINDOWS");

    private String name;
    private Integer value;

    OSTypeEenum(Integer value, String name) {
        this.name = name;
        this.value = value;
    }

    public static OSTypeEenum getObject(Integer value) {
        for(OSTypeEenum osTypeEenum: OSTypeEenum.values()) {
            if(osTypeEenum.getValue().equals(value)) {
                return osTypeEenum;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }
}
